﻿using Service.Interface;
using Entities;
using System;
using System.ServiceModel;

namespace Service
{
    public class PeopleService : IPeopleOperator
    {
        
        public void DeletePerson(Person person)
        {
            if (person == null)
            {
                var error = new ErrorInformation("参数person为null",
                    "PeopleService",
                    "DeletePerson");

                throw new FaultException<ErrorInformation>(error);
            }
            else
            {
                Console.WriteLine("Have deleted a person whoes name is:" + person.Name);
            }
        }
    }
}
